package com.ruoyi.web.dao;

import com.ruoyi.web.entity.ReportSummeryEntity;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author ：wang.j.f
 * @description：TODO
 * @date ：Created in 2021/8/28 11:19
 * @modified By：
 * @version: 1.0$
 */
@Mapper
public interface ReportSummeryDao {

//    @Insert("insert into report_summery (unit_name, wgz_name, should_done_num_weekly, total_report_num, effective_report_num, " +
//            "effective_report_rate, effective_complete_rate, report_time, type) values <foreach collection='list' item='item' index='index' separator=','> " +
//            "(#{item.unitName},#{item.wgzName},#{item.shouldDoneNumWeekly},#{item.totalReportNum},#{item.effectiveReportNum},#{item.effectiveReportRate},#{item.effectiveCompleteRate}," +
//            "#{item.reportTime},#{item.type}) </foreach> " +
//            "ON DUPLICATE KEY UPDATE unit_name=VALUES(unit_name),wgz_name=VALUES(wgz_name),should_done_num_weekly=VALUES(should_done_num_weekly),total_report_num=VALUES(total_report_num)," +
//            "effective_report_num=VALUES(effective_report_num),effective_report_rate=VALUES(effective_report_rate),effective_complete_rate=VALUES(effective_complete_rate)," +
//            "report_time=VALUES(report_time),type=VALUES(type)")
    void batchAdd(@Param("list") List<ReportSummeryEntity> list);
}
